package random.fox.p2p.ui;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import android.widget.Toast;

import butterknife.ButterKnife;
import flow.Flow;
import random.fox.p2p.Paths;
import random.fox.p2p.view.IExpandView;

/**
 * Created by delong on 2015/3/23.
 */
public class DynamicView extends LinearLayout implements IExpandView {
    public DynamicView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        ButterKnife.inject(this);
    }

    @Override
    public void entry(int index) {
        Toast.makeText(getContext(), "entry:" + index, Toast.LENGTH_SHORT).show();
    }

    @Override
    public void expand() {
        Toast.makeText(getContext(), "expand:", Toast.LENGTH_SHORT).show();
        Flow.get(getContext()).set(new Paths.ExpandDynamicPath());

    }
}
